package com.hdax.dm.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hdax.dm.entity.order.DmOrder;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrderMapper extends BaseMapper<DmOrder> {

    /*@Select({
            "<script>",
                "select * from dm_order WHERE 1=1",
                "<if test='orderType!=null'>",
                    "and orderType=#{orderType}",
                "</if>",
                "<if test='keyword!=null'>",
                    "and itemName like CONCAT('%',#{keyword},'%')",
                "</if>",
                "<if test='orderTime == 2'>",
                    "and DATE_SUB(NOW(), INTERVAL 3 MONTH) &lt; date(createdTime)",
                "</if>",
                "<if test='orderTime!=null and orderTime==1'>",
                    "and DATE_SUB(NOW(), INTERVAL 1 YEAR) &lt;= date(createdTime)",
                "</if>",
            "</script>"
    })
    List<DmOrder> queryorderlist(@Param("keyword") String keyword, @Param("orderTime") Integer orderTime, @Param("orderType") Integer orderType);*/
}
